#{extends 'padrao.html' /}
#{set title:'formCadastrarCerimonia.html' /}

			<!--FormConsulta de Cerimonia -->
			<h3>Consultar Cerimonias Cadastradas</h3>
			<form id="fomConsultarCerimonias" name="fomConsultarCerimonias" method="GET" action="@{Cerimonia.consultarCerimonia()}">
				<table>
					<tr>
						<td>CÃ³digo</td>
						<td>DescriÃ§Ã£o</td>
						<td>Celebrante</td>
						<td>Igreja</td>
						<td>Estado</td>
					</tr>
					<tr>
						<td><input size = "6px" type="text" name="aCodCerimonia" value=""/></td>
						<td><input size = "40px" type="text" name="aDescricao" value=""/></td>
						<td>
							<select name="aCodCelebrante">
								<option value = 0>[Qualquer]</option>
								#{list items: celebrantes,as: 'celebrante'}
									<option value = ${celebrante.getCodCelebrante()}>${celebrante.getNome()}</option>
								#{/list}	
							</select>
						</td>	
						<td>
							<select name="aCodIgreja">
								<option value = 0>[Qualquer]</option>
								#{list items: igrejas,as: 'igreja'}
									<option value = ${igreja.getCodIgreja()}>${igreja.getNome()}</option>
								#{/list}	
							</select>
						</td>
						<td>
							<select name="aEstado">
								<option value="1">Aberta</option>
								<option value="2">Lotada</option>
								<option value="0">Realizada</option>
							</select>
						</td>
					</tr>
					<tr>
						<td><input nome = "btConsultar" type="submit"  value="Consultar"/></td>
						<td><input id = "btCadastrar" nome = "btCadastrar" type="button"  value="Cadastrar" onclick="viewForms('fomCadastrarCerimonia',765,15)"/></td>
					<tr>
				</table>
			</form>

			<h3>Cerimonias Cadastradas</h3>
			<table class="tabela_cont">
			<tr class = "tabela_cont_title" >
				<td width="70px">CÃ³digo</td>
				<td width="230px">Descricao</td>
				<td width="125px">Local</td>
				<td width="100px">Data</td>
				<td width="100px">Celebrante</td>
				<td width="55px"></td>
				<td width="55px"></td>
			</tr>
			#{list items: cerimonias,as: 'cerimonia'}
				<tr class="tabela_cont_ln1">
					<td>${cerimonia.getCodCerimonia()}</td>
					<td>${cerimonia.getDescricao()}</td>
					<td>Igreja ${cerimonia.getNomeIgreja()}</td>
					<td>${cerimonia.getDataCerimonia()}</td>
					<td>${cerimonia.getNomeCelebrante()}</td>
					<td><a href="@{VSecretaria.formEditarCerimonia(cerimonia.getCodCerimonia())}" >Editar</a></td>
					<td><a href="@{Cerimonia.excluirCerimonia(cerimonia.getCodCerimonia())}" >Excluir</a></td>
				</tr>
			#{/list}
		</table>

 <!-- Form cadastro de cerimonia-->
 
<div class = "classforms">

	
	<form id="fomCadastrarCerimonia" name="fomCadastrarCerimonia" method="POST" action="@{Cerimonia.cadastrarCerimonia()}" >
	<h3>Cadastrar Cerimonia</h3>
		<table>
			<tr> String aLoginUsuarioCadastro,
				<td>DescriÃ§Ã£o</td>
				<td>Data</td>
				<td>Igreja</td>
				<td>Celebrante</td>
				<td>Tipo Cerimonia</td>
				<td>Qtd. Sacramentos</td>
			</tr>
			<tr>
				<td><input size = "30px"type="text" name="aDescricao" value=""/></td>
				<td><input size = "10px"type="text" name="aDataCerimonia" value=""/></td>
				<td>
					<select name="aCodIgreja">
						#{list items: igrejas,as: 'igreja'}
							<option value = ${igreja.getCodIgreja()}>${igreja.getNome()}</option>
						#{/list}	
					</select>
				</td>
				<td type="text"  value="1">
					<select name="aCodCelebrante">
						#{list items: celebrantes,as: 'celebrante'}
							<option value = ${celebrante.getCodCelebrante()}>${celebrante.getNome()}</option>
						#{/list}
					</select>
				</td>
				<td>
					<select name="aCodTipoCerimonia">
						#{list items: tipocerimonia,as: 'tipoceri'}
							<option value = ${tipoceri.getCodTipoCerimonia()} >${tipoceri.getSigla()}</option>
						#{/list}	
					</select>
				</td>
				<td><input size = "15px"type="text" name="aQtdSacramentos" value=""/></td>
			</tr>
			<tr>
				<td>
					<input type="submit" id="btConfirmar" value="Cadastrar"/>
					<input type="button" id="btCancelar"  name="btCancelar" value="Cancelar" onclick="viewCancelForm()"/>
				</td>
				<td></td>
			<tr>
		</table>
	</form> 
</div> 